r = 1 gotspear = 1 skunkape = 1 SCREEN 12 COLOR 7, 0 CLS DIM SHARED DOOM AS DOUBLE Minutes = 10 Seconds = 0 GameTime = Minutes * 60 + Seconds DIM directions(1 TO 14) AS STRING directions(1) = "EAST" directions(2) = "NORTH, SOUTH, OR WEST" directions(3) = "NORTH OR SOUTH" directions(4) = "NORTH" directions(5) = "SOUTH OR EAST" directions(6) = "EAST OR WEST" directions(7) = "WEST" directions(8) = "NORTH OR EAST" directions(9) = "WEST OR SOUTH" directions(10) = "NORTH OT EAST" directions(11) = "EAST OR WEST" directions(12) = "NORTH, SOUTH, OR WEST" directions(13) = "SOUTH" directions(14) = "NORTH" PRINT "" PRINT "" PRINT "Southern United States...June tenth, 1888. You are in the back country of some" PRINT "small forgotten town. Where sightens of a being that stalks those who wander" PRINT "around in the night. Do you have what it takes to bring this foul murdering" PRINT "beast down? Do you think you can survive the horrors of the swamp? Do so if" PRINT "you dare." PRINT "" DO: LOOP UNTIL INKEY$ <> "" DOOM = TIMER(0.001) + GameTime 'change this to to desied time for the game to run DO CLS PRINT PRINT PRINT " " PRINT " " PRINT " " PRINT " The Hunt for the Ape " PRINT " " PRINT " Written by " PRINT " " PRINT " D.B. Taylor" PRINT "" PRINT " Copyright (c) 2015" PRINT "" PRINT SPACE$(38); IF INSTR(directions(r), "NORTH") THEN PRINT "N" ELSE PRINT PRINT "*---------------------------------* "; IF INSTR(directions(r), "WEST") THEN PRINT "W"; ELSE PRINT " "; PRINT " + "; IF INSTR(directions(r), "EAST") THEN PRINT "E"; ELSE PRINT " "; PRINT " *------------------------------------*" PRINT SPACE$(38); IF INSTR(directions(r), "SOUTH") THEN PRINT "S" ELSE PRINT PRINT PRINT "If you are stuck just type HELP." PRINT GOSUB ROOM GOSUB parser LOOP ROOM: IF r = 1 THEN: GOSUB r1 IF r = 2 THEN: GOSUB r2 IF r = 3 THEN: GOSUB r3 IF r = 4 THEN: GOSUB r4 IF r = 5 THEN: GOSUB r5 IF r = 6 THEN: GOSUB r6 IF r = 7 THEN: GOSUB r7 IF r = 8 THEN: GOSUB r8 IF r = 9 THEN: GOSUB r9 IF r = 10 THEN: GOSUB r10 IF r = 11 THEN: GOSUB r11 IF r = 12 THEN: GOSUB r12 IF r = 13 THEN: GOSUB r13 IF r = 14 THEN: GOSUB r14 RETURN parser: PRINT "> "; cmd$ = GrabInput cmd$ = LTRIM$(RTRIM$(UCASE$(cmd$))) IF cmd$ = "END" OR cmd$ = "QUIT" OR cmd$ = "EXIT" OR cmd$ = "Q" THEN END END IF IF cmd$ = "HELP" OR cmd$ = "H" OR cmd$ = "?" THEN CLS PRINT "HERE ARE SOME BASIC COMMANDS THAT CAN BE USED IN THE GAME..." PRINT PRINT "NORTH, EAST ,SOUTH, AND WEST - MOVE TO AN AVAILABLE LOCATION" PRINT "EXAMINE (OBJECT) - EXAMINE AN OBJECT" PRINT "USE (OBJECT) - USE AN OBJECT" PRINT "TAKE (OBJECT) - TAKE OR MOVE AN OBJECT" PRINT "INVENTORY - VIEW YOUR INVENTORY" PRINT "DRINK - DRINK BEER" PRINT "UNLOCK - UNLOCK DOOR" PRINT "HELP - VIEW THIS SCREEN" PRINT "END - END GAME" PRINT PRINT "PRESS ANY KEY...": SLEEP DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "INVENTORY" OR cmd$ = "INV" OR cmd$ = "ITEMS" OR cmd$ = "I" THEN CLS PRINT "INVENTORY..." PRINT IF gotspear = 1 THEN: PRINT "A spear blessed from a noble craftsman." PRINT PRINT "PRESS ANY KEY..." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "GO NORTH" OR cmd$ = "NORTH" OR cmd$ = "N" THEN IF r = 4 THEN: r = 3: GOTO moved IF r = 3 THEN: r = 2: GOTO moved IF r = 2 THEN: r = 5: GOTO moved IF r = 10 THEN: r = 9: GOTO moved IF r = 9 THEN: r = 7: GOTO moved IF r = 8 THEN: r = 6: GOTO moved IF r = 14 THEN: r = 12: GOTO moved IF r = 12 THEN: r = 13: GOTO moved END IF IF cmd$ = "GO EAST" OR cmd$ = "EAST" OR cmd$ = "E" THEN IF r = 12 THEN: r = 11: GOTO moved IF r = 11 THEN: r = 10: GOTO moved IF r = 9 THEN: r = 8: GOTO moved IF r = 7 THEN: r = 6: GOTO moved IF r = 6 THEN: r = 5: GOTO moved IF r = 2 THEN: r = 1: GOTO moved END IF IF cmd$ = "GO SOUTH" OR cmd$ = "SOUTH" OR cmd$ = "S" THEN IF r = 5 THEN: r = 2: GOTO moved IF r = 2 THEN: r = 3: GOTO moved IF r = 3 THEN: r = 4: GOTO moved IF r = 6 THEN: r = 8: GOTO moved IF r = 9 THEN: r = 10: GOTO moved IF r = 13 THEN: r = 12: GOTO moved IF r = 12 THEN: r = 14: GOTO moved END IF IF cmd$ = "GO WEST" OR cmd$ = "WEST" OR cmd$ = "W" THEN IF r = 12 THEN: r = 11: GOTO moved IF r = 11 THEN: r = 10: GOTO moved IF r = 9 THEN: r = 8: GOTO moved IF r = 7 THEN: r = 6: GOTO moved IF r = 6 THEN: r = 5: GOTO moved IF r = 2 THEN: r = 1: GOTO moved END IF IF (cmd$ = "USE SPEAR") THEN CLS PRINT "You thrust the spear in the air like a mad man dancing in the rain." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE APE") AND r = 14 THEN CLS PRINT "A strong stench fills the air. A growl can be heard in the distance" PRINT "and you can see the glowing eye's of the creature through the brush." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE SPEAR") AND gotspear = 1 THEN CLS PRINT "A wooden spear crafted from a once mighty pine tree from the tundra" PRINT "of the Yukon." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "USE SPEAR") AND gotspear = 1 AND r = 14 THEN CLS GOTO win: DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "TALK TO IT") AND r = 14 THEN CLS GOTO lose: DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF moved: RETURN r1: PRINT "The sun is setting behind you as the vast plain of the swamp" PRINT "invites you into it's sickening grasp. The eye's of someone" PRINT "or something watching you from a distance. The hunt begin's." RETURN r2: PRINT "Though the sun is going down, you can feel the heat rising from" PRINT "the Earth beneath your feet." RETURN r3: PRINT "You are following a narrow path that leads to a forgotten realm" PRINT "once used by those from the era of jazz and moonshine." RETURN r4: PRINT "A deadend of course...the path ends and leads you into a swamp." PRINT "I don't think I'm going to be bait for anything today." RETURN r5: PRINT "Not a single bug insight. Usually when one walks into this place" PRINT "where people put things that are dead in the hopes of hiding them." PRINT "The bugs are quite bad...but not today." RETURN r6: PRINT "As the sun fades completely away, the sudden change in temperature" PRINT "brings speed to your step and makes you fear the worls around you." RETURN r7: PRINT "A gathering of tree's and brush that blocks the path. No way of entry." RETURN r8: PRINT "A loud yell is heard, like that of an animal...calling out for it's" PRINT "kin." RETURN r9: PRINT "A strong stench fills the air, causing you to place your hand over" PRINT "your mouth. -My God, what's that stench?-" RETURN r10: PRINT "With every step you take, the smell grows ever so stronger." RETURN r11: PRINT "You are standing before a river bed, the waters are moving slow," PRINT "you hear a clicking sound." RETURN r12: PRINT "The calm gently moving waters sorta relax you and calm you down for a" PRINT "bit." RETURN r13: PRINT "It's watching you...it knows you are here...and it wants you to leave." RETURN r14: PRINT "The strong yellow eye's of the best from the brush, they glow as if" PRINT "they are rare stones. Standing before you is the beast that was once" PRINT "believed to not have existed. What will you do?" RETURN win: COLOR 2, 0 CLS PRINT "You thrust the spear into the air like a mighty soldier in" PRINT "an army long since man kind forged a modern society. The beast" PRINT "falls to the ground with a mighty -thump-. It let's out a" PRINT "massive sigh and dies. You have saved the countryside from" PRINT "this menace. This lost link, this forgotten chapter of human" PRINT "evolution, pity it had to come to this. But now, you can rest" PRINT "and enjoy a find glass of scotch." PRINT DO: LOOP UNTIL INKEY$ <> "" END lose: COLOR 2, 0 CLS PRINT "You panic, you try to fight but it snaps the spear right from" PRINT "out of your hands. Before you can run, he grabs you by the throat" PRINT "and snaps your neck...pity." PRINT DO: LOOP UNTIL INKEY$ <> "" END FUNCTION GrabInput$ x = POS(0) y = CSRLIN maxwidth = _WIDTH - x PCOPY 0, 1 'make a backup copy of the screen DO k = _KEYHIT i$ = INKEY$ LOOP UNTIL k = 0 AND INKEY$ = "" 'clear the keyboard buffer DO _LIMIT 30 PCOPY 1, 0 LOCATE y, x: PRINT Userinput$ k = _KEYHIT SELECT CASE k CASE 8 Userinput$ = LEFT$(Userinput$, LEN(Userinput$) - 1) CASE 65 TO 90, 97 TO 122, 32 Userinput$ = UCASE$(Userinput$ + CHR$(k)) END SELECT timerleft## = (DOOM - TIMER(0.001)) minutes = timerleft## \ 60 seconds = timerleft## - minutes * 60 LOCATE 2, 32: PRINT USING " ###:##.###"; minutes, seconds IF timerleft## <= 0 THEN GOTO doomed _DISPLAY LOOP UNTIL k = 13 GrabInput$ = Userinput$ _AUTODISPLAY EXIT FUNCTION doomed: CLS PRINT "Before you know it, the beast runs back into the depth's of the swamp." PRINT "It is never seen again and you've just wasted your time hunting something" PRINT "that no one else believes in. Better go back home now and think about" PRINT "the time you've wasted." _DISPLAY END END SUB